package parser;

import java.io.*;
   
public class ParserMain {
  String fileName;
  
  public ParserMain (String fileName)
  {
    this.fileName = fileName;
  }
  
  public Object parseAst () 
  {    
    try 
    {
      parser p = new parser (new miniJava (new FileReader (fileName)));
      Object result = p.parse().value;
      return result;  
    } 
    catch (Exception e) 
    {
      e.printStackTrace();
      return null;
    }
  }
}


